﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JS_SendMsgToAll.aspx.cs" Inherits="HNQXYJ.GPRS.JS_SendMsgToAll" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../CSS/public.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/SimpleContent.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery-1.5.1.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            //清空信息
            $("#reset").click(function () {
                var sendMsg = $("#sendMsg").val("");

            });

            $("#send").click(function () {
                var sendMsg = $("#sendMsg").val();
                var sendTimes = $("#sendTimes").val();
                if (sendMsg == "" || sendMsg.length < 3) {
                    alert("信息内容不能为空或长度不能少于3个字符");
                    return;
                }
                else {
                    $.post("../BLL/TerminalAsh.ashx", { "action": "sendMsgGroup", "sendMsg": sendMsg, "sendTimes": sendTimes }, function (data, status) {
                        if (status == "success") {
                            if (data == "ok") {
                                alert("信息已经发出");
                            }
                            else {
                                alert("信息发送失败");
                            }
                        }

                    });
                }

            });

        });

      

    </script>
</head>
<body>
    <form id="form1" runat="server">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="610">
                    <tr>
                        <td class="rtbg">
                            <span> GPRS信息群发 &nbsp;》
                              </span>
                        </td>
                    </tr>
                    <tr>
                        <td  class="rbg" valign="top" align="center"  style="padding-top:20px">
                            
                             <table class="dataList" cellpadding="0" cellspacing="0" width="97%">
                                    <caption>GPRS信息群发</caption>
                                      <tr>
                                        <td class="Graybgr" width="10%">请选择目标区：</td>
                                        <td class="Lightbluebg" width="90%">
                                          <select id="selectArea" >
                                           <option selected="selected"  value="0"> 请选择一个区&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
                                             <option value="1">所有目标区域</option>
                                             <option value="2">新郑</option>
                                             <option value="3">中牟</option>
                                             <option value="4">上街</option>
                                             <option value="5">荥阳</option>
                                              <option value="6">二七区</option>
                                               <option value="7">惠济区</option>
                                               <option value="8">新密</option>
                                               <option value="9">登封</option>
                                           </select>
                                        </td>
                                      </tr>
                                      <tr>
                                        <td class="Graybgr" width="10%">发送内容：</td>
                                        <td class="Lightbluebg" width="90%">
                                            <asp:TextBox ID="sendMsg" runat="server" TextMode="MultiLine" Width="80%" 
                                                Height="100px" MaxLength="350"></asp:TextBox>
                                        </td>
                                      </tr>
                                       <tr>
                                        <td class="Graybgr" width="10%">发送次数：</td>
                                        <td class="Lightbluebg" width="90%">
                                            <input id="sendTimes" type="text" value="3" style=" width:40px"  />次
                                        </td>
                                      </tr>
                                    
                                      <tfoot>
                                        <tr>
                                           <td colspan="2" style=" text-align:left "> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img id="reset" src="../images/qk.gif" />&nbsp;&nbsp;&nbsp;
                                               <%--<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="../images/send.jpg" 
                                                   onclick="ImageButton1_Click" />--%>
                                                   <img src="../images/send.jpg" id="send" />
                                            </td>
                                        </tr>
                                      </tfoot>
                               </table>
                         </td>
                     </tr>
              </table>
</form>
</body>
</html>
